package com.sm.tool.enums;

/**
 * 因为本项目为一人 全局返回信息便定义再此，不考虑频繁修改冲突问题
 */
public enum ResultEnums {

    UNKNOWN_ERROR(5000, "未知错误，请稍后再试或联系管理员"),
    SUCCESS(2003, "成功"),
    PARAM_ERROR(4401, "输入信息有误，请检查输入信息"),
    LOGIN_FAILED(5501, "登录失败"),
    LOGIN_EXCEPTION(5502, "登录异常"),
    USER_NOT_FOUND(5503, "用户不存在或未激活"),
    PASSWORD_INCORRECT(5504, "密码不正确"),
    INVALID_TOKEN(5505, "无效的token"),
    TOKEN_EXPIRED(5506, "过期的身份令牌"),
    UNAUTHORIZED(5507, "没有权限"),
    DELETE_FAILED(5508, "删除失败"),
    RESOURCE_NOT_FOUND(5509, "资源不存在"),
    USERNAME_ALREADY_EXIST(5510,"用户名重复请重新入"),
    ACCOUNT_EXPIRED(5511,"请重新登录"),
    REGISTER_FAIL(5512,"注册失败，请联系管理员"),
    PLEARSE_LOGIN(5513,"请登录"),
    VCODE_FIVE(4415,"注册验证码，五分钟至多只能获取一次，请五分钟后再获取"),
    VCODE_ERROR(4416,"验证码错误"),
    VCODE_NONENTITY(4416,"验证码不存在或已过期"),
    ADMINNOSUPPET(5517,"管理员不支持手机验证码登录"),
    PERMISSION_EXCEPTION(5518,"权限异常，或请稍后重试"),
    RETRY(5519,"服务繁忙，请重试"),
    TICKET_CODE_REPEAT(5520,"优惠券code重复，请重新输入"),
    ACTIVITYNOTSTART(5521,"活动未开始或已结束或已下架"),
    only_be_attended_once(5522,"该活动只能参加一次"),
    Ticket_not_no(5523,"该活动下该类型券余量不足")
    ;
    private Integer code;
    private String message;

    ResultEnums(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

}
